const mongoose = require('mongoose');
const usersModel = require('./usersModle')
const addressesSchema = new mongoose.Schema({
    name:String, // 收件人姓名
    phone:String, // 收件电话
    site: String, // 收件地址
 	userId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: usersModel
    }, // 用户 id
    tag: [String], // 标签
    isDefault: Boolean // 是否默认地址
})

module.exports = mongoose.model('addressesModel', addressesSchema, 'addresses')